#ifndef STRINGLISTMODEL_H
#define STRINGLISTMODEL_H

#include <QAbstractListModel>

class StringListModel : public QAbstractListModel
{
    Q_OBJECT
public:
    StringListModel(const QStringList & strings, QObject* parent = 0);
    virtual int rowCount(const QModelIndex& parent = QModelIndex()) const override;
    virtual QVariant data(const QModelIndex& index, int role) const override;
    virtual QVariant headerData(int section, Qt::Orientation orientation,
                        int role = Qt::DisplayRole) const override;
    Qt::ItemFlags  flags(const QModelIndex& index) const override;
    bool setData(const QModelIndex& index,
                 const QVariant &value, int role = Qt::EditRole)override;

    bool insertRows(int position, int rows, const QModelIndex & index = QModelIndex())override;
    bool removeRows(int position, int rows, const QModelIndex & index = QModelIndex())override;

private:
    QStringList StringList;
};

#endif // STRINGLISTMODEL_H
